import React from 'react';
import PopupPicker from '../m-picker/Popup';



export default class PopupCascader extends React.Component {
  static defaultProps = {
    pickerValueProp: 'value',
    pickerValueChangeProp: 'onChange',
  };

  onOk = (v) => {
    const { onChange, onOk } = this.props;
    if (onChange) {
      onChange(v);
    }
    if (onOk) {
      onOk(v);
    }
  }

  render() {
    return (<PopupPicker
      picker={this.props.cascader}
      {...this.props}
      onOk={this.onOk}
    />);
  }
}


